package com.samphanie.admin.modules.sys.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.samphanie.admin.modules.sys.service.ISysRoleService;
import com.samphanie.admin.modules.sys.service.ISysUserRoleService;
import com.samphanie.mbg.mapper.sys.SysRoleMapper;
import com.samphanie.mbg.model.sys.SysRole;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author ZSY
 * @date 2021/11/9 10:11
 */
@Service
@RequiredArgsConstructor
public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements ISysRoleService {

    private final ISysUserRoleService userRoleService;

    /**
     * 根据用户ID查询角色信息
     *
     * @param userId 用户ID
     * @return List<SysRole>
     */
    @Override
    public List<SysRole> queryUserRoleListByUid(Long userId) {
        return userRoleService.queryUserRoleListByUid(userId);
    }
}
